package pf.springBoot.springBootSSO.configuration;
//package pf.springBoot.springBootMetabaseLogin.configuration;
//
//import org.springframework.boot.web.server.ErrorPage;
//import org.springframework.boot.web.server.ErrorPageRegistrar;
//import org.springframework.boot.web.server.ErrorPageRegistry;
//import org.springframework.http.HttpStatus;
//import org.springframework.stereotype.Component;
//
//@Component
//public class MyError implements ErrorPageRegistrar {
//
//    @Override
//    public void registerErrorPages(ErrorPageRegistry errorPageRegistry) {
//        /*1、按错误的类型显示错误的网页*/
//        /*错误类型为404，找不到网页的，默认显示404.html网页*/
//        /*错误类型为500，表示服务器响应错误，默认显示500.html网页*/
////        ErrorPage e404 = new ErrorPage(HttpStatus.NOT_FOUND, "/templates/error/error404.html");
////        ErrorPage e500 = new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/templates/error/error500.html");
////        
//        ErrorPage e404 = new ErrorPage(HttpStatus.NOT_FOUND, "/error404.html");
//        ErrorPage e500 = new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/error500.html");
//        errorPageRegistry.addErrorPages(e404, e500);
//    }
//
//}